<?php
namespace PsiFramework\Classes\Util\Parameters\Object\Operations\Elements;

import("Classes.Util.Parameters.Object.Operations.Elements.OperationColumn");
import("Classes.Util.Parameters.Object.Operations.Elements.OperationElement");
import("Classes.Util.Parameters.Object.Operations.Elements.OperationValue");

use \PsiFramework\Classes\Util\Parameters\Object\Operations\Elements\OperationElement;

/**
 * PsiFramework
 * Php Simple Framework
 *
 * @author Rémi San
 * @version beta
 */

/**
 * The Trigger class is the class to manage object parameters operation clauses
 *
 * @package Util.Parameters.Object
 */
abstract class OperationClause extends OperationElement
{

    protected /*string*/             $_type;
    protected /*OperationElement[]*/ $_elements ;

    public function __construct(
        /*string*/ $type=null,
        /*OperationElement[]*/ $elements=array()
    )
    {
        $this->_type = $type ;
        $this->_elements = $elements ;
    }

    public function getType()
    {
        return $this->_type ;
    }

    public function setType(/*string*/ $type)
    {
        $this->_type = $type ;
    }

    public function getElements()
    {
        return $this->_elements ;
    }

    public function getElement($index)
    {
        return $this->_elements[$index] ;
    }

    public function setElements(/*OperationElement[]*/ $elements)
    {
        $this->_elements = $elements ;
    }

    public function addElement(OperationElement $element)
    {
        $this->_elements[] = $element ;
    }
}
